Skip to content

Add _missing_ implementation to StrEnum enums#37

Open
rchl wants to merge 1 commit intomainfrom
feat/missing
Open

Add _missing_ implementation to StrEnum enums#37
rchl wants to merge 1 commit intomainfrom
feat/missing

Conversation

@rchl
Copy link
Copy Markdown
Member

@rchl rchl commented Apr 18, 2026

Add _missing_ implementation for string enumerations that have supportsCustomValues specified in schema.

LSP-json has a code that assigns custom language ID to TextDocument.languageId. That triggers a type error:

Could not assign item in TypedDict. "Literal['jsonc']" is not assignable to "LanguageKind" (reportGeneralTypeIssues)

Adding _missing_ implementation allows us to use a code like:

text_document['languageId'] = LanguageKind('jsonc')

to set custom language ID without triggering type error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant